package utils

import "fmt"

type account struct{
	num string
	pwd int
	balance float64
}

func NewAccount(num string ,pwd int,balance float64 ) *account {
	if len(num)<6||len(num)>15{
		fmt.Println("账号长度不对")
		return nil
	}
	if len(pwd)!=6{
		fmt.Println("密码长度不对")
		return nil
	}
	if balance<20{
		fmt.Println("存款不对")
		return nil
	}
	return &account{
		num:num,
		pwd:pwd,
		balance:balance,
	}
}